home *** CD-ROM | disk | FTP | other *** search
- Path: news.bridge.net!news
- From: David Byrden <100101.2547@compuserve.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Passing a type-specifier as an argument?!?
- Date: 27 Feb 1996 00:29:57 GMT
- Organization: self-employed
- Message-ID: <4gtja5$vuh@news.bridge.net>
- References: <rdk2-2602961506440001@dialin1-45.wustl.edu>
- NNTP-Posting-Host: ppp-mia2-68.bridge.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
-
-
- >>>>>>>>
- #define _ones(t) _onesguts(t(0))
-
- template <class T>
- T _onesguts(T n){
- // stuff...
- }
-
- What I would like to know is if there is a way to get around having to use
- a define to do ones(int). Any help is geatly appreciated...
- <<<<<<<<<<
-
-
- I'm afraid not. The standard library itself passes around null pointers
- internally as "type tags". But in the interest of good style, you should
- drop the #define anyway.
-
-
- David
-
-
-
-